fix: emit merge flow for empty ELSE bodies (CE0079)#474
Conversation
AI Code ReviewWhat Looks Good
RecommendationApprove the PR. The fix resolves the reported issue with appropriate test coverage and follows existing code patterns. No changes are requested. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
a46bbef to
7f878c4
Compare
|
CI stabilization note: merged #412 into this branch so it uses the same integration-CI baseline as the rest of the active PR set. |
AI Code ReviewCritical Issues
Moderate IssuesNone Minor IssuesNone What Looks Good
RecommendationPlease split this PR into three separate PRs:
Only after splitting should the IF builder fix be approved. The other two changes are valid improvements but are unrelated to the stated bug fix. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor Issues
What Looks GoodMain Fix (CE0079)
TUI Watcher Race Condition Fix
Java Action Return Type Handling
Test Coverage
RecommendationApprove. The PR correctly fixes the CE0079 issue with a well-tested solution that mirrors existing patterns. Additional improvements to the TUI watcher (race condition fix) and Java action return type handling are valuable robustness enhancements. All changes are focused, properly tested, and maintain code quality standards. The nanoflow examples simplification, while somewhat tangential, doesn't harm functionality and may improve maintainability. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
Review: fix: emit merge flow for empty ELSE bodies (CE0079)Two blockers before this can merge. Blocker 1 — test doesn't exercise the new codeThe test creates fb.addIfStatement(&ast.IfStmt{
Condition: ...,
ThenBody: []ast.MicroflowStatement{&ast.LogStmt{...}},
// ElseBody deliberately empty
})With the current The new The test comment acknowledges this ("see below") but there is no second test in the PR. A test that exercises the new code must set both Blocker 2 — hidden dependency on PR #366 (
|
|
Addressed the review blocker:
|
Symptom: an IF statement with a continuing THEN branch and an explicit but empty ELSE branch could build a split/merge graph without a configured false outgoing flow, causing Studio Pro CE0079. Root cause: the IF builder only connected non-returning ELSE branches to the merge when the ELSE body produced a last activity ID. An explicitly empty ELSE has HasElse=true but no lastElseID, so the false case was dropped. Fix: when an explicit empty ELSE still requires a merge, emit a direct split-to-merge flow with case false, mirroring the existing empty-THEN handling. Tests: go test ./mdl/executor -run TestIfEmptyElseBodyWithContinuingThenEmitsFalseFlowToMerge -v; make build; make test; make lint-go.
fb3f277 to
ff795f7
Compare
|
Follow-up: after #366 landed on |
Summary
falsecase.false.IfStmt.HasElsesupport now present onmain, so the test distinguishes an omitted ELSE from an explicitly empty ELSE.Test plan
make buildmake testmake lint-goTestIfEmptyElseBodyWithContinuingThenEmitsFalseFlowToMergeasserts the split emits afalsecase flow into the mergeHasElse: true, so it exercises the explicit empty-ELSE path instead of the no-ELSE path🤖 Generated with Claude Code